<style>
    .edit-tree-content { background-color: white; margin: 0px; }
    .edit-tree-content .row { margin: 0px; margin-top: 15px;}
    /*.edit-tree-content .master-content { border-right: medium double #ddd; }*/
    .edit-tree-content .btn-content { padding-bottom: 15px; }
    .relate-bottom {
        padding-top: 5px;
        padding-bottom: 5px;
        border-bottom: 1px solid #edf1f2;
    }
    .relate-bottom span {
        cursor: pointer;
    }
    .isJump {
        color: white;
        background-color: #23b7e5;
    }
</style>

<!--<m-page-head title="修改产品设计"></m-page-head>-->
<m-project-plan select-tab="feature" type="req">
    <div class="row edit-tree-content">
        <div class="col-lg-3 col-md-3 col-sm-3 col-xs-12 hide">
            <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 master-content" ng-if="info.reloadTree">
                <m-fun-tree hide-tree="true" on-node-select="onSelect(info)" req-id="{{info.reqId}}" tree-array="info.treeArray" selected-option="info.selectedOption" with-children="{{info.withChild}}" tree-operation="true" edit-btn-status="false" on-change-text="{{info.text}}" is-disabled="info.disabledStatus" contact-select="contactRelieve(info)"></m-fun-tree>
            </div>
        </div>
        
        <!-- start -->
        <div class="col-lg-3 col-md-3 col-sm-3 col-xs-12">
            <div class="panel panel-default" style="margin-top: 5px;">
                <div class="panel-heading">关联列表（{{ info.relateItemList.length }}个）</div>
                <div class="panel-body master-content" ng-if="info.relateItemList.length">
                    <div class="list-group bg-white">
                        <div class="col-sm-12 relate-bottom" ng-repeat="feature in info.relateItemList track by $index" ng-class="info.sltItemId == feature.id ? 'isJump' : ''" ng-click="clickRelateItem(feature)">
                            <span ng-if="feature.type == 'PROTOTYPE'" title="{{feature.path}}">
                                {{$index + 1}}.&nbsp;&nbsp;&nbsp; ...{{feature.path | limitTo: -6 }}/页面
                            </span>
                            <span ng-if="feature.type != 'PROTOTYPE'" title="{{feature.path}}/{{feature.featureName}}">
                                {{$index + 1}}.&nbsp;&nbsp;&nbsp; ...{{feature.path + '/'+feature.featureName| limitTo: -8 }}
                            </span>
                            <span class="pull-right">
                                <span class="label bg-success pull-right" ng-if="feature.status == 'ADD'">新增</span>
                                <span class="label bg-danger pull-right" ng-if="feature.status == 'UPDATE'">修改</span>
                                <span class="label bg-dark pull-right" ng-if="feature.status == 'DELETE'">删除</span>
                                <span class="label bg-primary pull-right" style="margin-right: 3px;">{{getFeatureSysSimple(feature.sys)}}</span>
                                <span class="label bg-primary pull-right" style="margin-right: 4px;" ng-if="feature.type == 'PROTOTYPE'">P</span>
                                <span class="label bg-primary pull-right" style="margin-right: 4px;" ng-if="feature.type != 'PROTOTYPE'">F</span>
                            </span>
                        </div>
                    </div>
                </div>
                <div class="panel-body" ng-if="!info.relateItemList.length">暂无数据！</div>
            </div>
        </div>
        <!-- end -->

        <div class="col-lg-9 col-md-9 col-sm-9 col-xs-12" ng-if="info.showMap">
            <winit-feature-map map-datas="info.mapDatas"
                               is-feature-map="true"
                               relate-list="info.relateList"
                               blur="selectMap(info)"
                               diagram-scope="info.diagramScope"
                               search="info.search"
                               add-menu-fun="addMenu()"
                               add-page-fun="addPage()" 
                               add-feature-fun="addFeature('add')" 
                               remove-fun="delete()"
                               find-feature-fun="findFeature()"
                               relate-fun="relate(info)"
                               relive-fun="relive(info)"
                               select-sys-fun="selectLegendSysItem(item)">
            </winit-feature-map>
        </div>
        <div class="col-lg-9 col-md-9 col-sm-9 col-xs-12" ng-if="info.showPanel == 'true' && !info.showMap">
            <winit-feature-panel req-id="info.reqId" feature-id="info.featureId" sys="info.sys" panel-type="tree" selected-branch="info.branch" do-compare="true" show-header="false"></winit-feature-panel>
        </div>
        <div class="col-lg-9 col-md-9 col-sm-9 col-xs-12" ng-if="info.showPanel == 'false' && !info.showMap">
            <winit-prototype-panel req-id="info.reqId" feature-id="info.featureId" sys="info.sys" panel-type="tree" selected-branch="info.branch"></winit-prototype-panel>
        </div>
    </div>
</m-project-plan>
<winit-settings btn-list="settings.btnEle"></winit-settings>